getTextDecorations

abstract fun getTextDecorations(block: DesignBlock, from: Int = -1, to: Int = -1): List<TextDecorationConfig>

Returns the ordered list of unique text decoration configurations in the selected range.

Return

the ordered list of unique decoration configurations.

Parameters

block

the text block whose text decorations should be returned.

from

the start index of the UTF-16 range whose text decorations should be returned. If the value is negative and the block is currently being edited, this will fall back to the start of the current cursor index / selected range. If the value is negative and the block is not being edited, this will fall back to the start of the entire text range.

to

the index after the last character of the range whose text decorations should be returned. If the value is negative and the block is currently being edited, this will fall back to the end of the current cursor index / selected range. If the value is negative and the block is not being edited, this will fall back to the end of the entire text range.